package cn.homework.service.impl;

import cn.homework.dao.ShoppingCarDao;
import cn.homework.dao.impl.ShoppingCarDaoImpl;
import cn.homework.domain.OrderDetails;
import cn.homework.service.ShoppingCarService;

import java.util.List;

/**
 * @author ACT
 */
public class ShoppingCarServiceImpl implements ShoppingCarService {
    private ShoppingCarDao dao = new ShoppingCarDaoImpl();

    @Override
    public List<OrderDetails> findAllShoppingCart() {
        return dao.findAllShoppingCart();
    }

    @Override
    public void deldelChooseShoppingCartProduct(String orderId) {
        dao.deldelChooseShoppingCartProduct(orderId);
    }

    @Override
    public void emptyShoppingCart() {
        dao.emptyShoppingCart();
    }

    @Override
    public void addProductToShoppingCart(String id) {
        dao.addProductToShoppingCart(id);
    }

    @Override
    public void plusProduct(String id) {
        dao.plusProduct(id);
    }

    @Override
    public void lessProduct(String id) {
        dao.lessProduct(id);
    }
}
